﻿<UserControl
	x:Class="nRoute.Samples.SiteMapClient.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:n="http://nRoute/schemas/2010/xaml"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
    mc:Ignorable="d"
    d:DesignWidth="780" d:DesignHeight="480">
    
	<i:Interaction.Behaviors>
		<n:BridgeViewModelBehavior/>
	</i:Interaction.Behaviors>

    <Grid x:Name="LayoutRoot" Style="{StaticResource LayoutRootGridStyle}">

        <Border x:Name="ContentBorder" Style="{StaticResource ContentBorderStyle}">
        	<n:StatefulContainer x:Name="ContentFrame" Url="Content/Pages/Home/" Style="{StaticResource ContentFrameStyle}" >
        		<i:Interaction.Behaviors>
        			<n:NavigationHandlerBehavior IsDefaultHandler="True"/>
        			<n:NavigationShellIntegrationBehavior/>
        		</i:Interaction.Behaviors>
        	</n:StatefulContainer>
        </Border>

    	<Grid x:Name="NavigationGrid" Style="{StaticResource NavigationGridStyle}">

    		<Border x:Name="LinksBorder" Style="{StaticResource LinksBorderStyle}">
    			<ItemsControl ItemsSource="{Binding SiteMapNodes}">
    				<ItemsControl.ItemsPanel>
    					<ItemsPanelTemplate>
    						<StackPanel Style="{StaticResource LinksStackPanelStyle}" />
    					</ItemsPanelTemplate>       		
    				</ItemsControl.ItemsPanel>	        	
    				<ItemsControl.ItemTemplate>
    					<DataTemplate>
    						<HyperlinkButton Style="{StaticResource LinkStyle}" Content="{Binding Title}" 
    							ToolTipService.ToolTip="{Binding Description}">
    							<i:Interaction.Triggers>
    								<i:EventTrigger EventName="Click">
    									<n:ExecuteSiteMapNodeAction SiteMapNode="{Binding}"/>
    								</i:EventTrigger>
    							</i:Interaction.Triggers>
    						</HyperlinkButton>
    					</DataTemplate>
    				</ItemsControl.ItemTemplate>
    			</ItemsControl>                
    		</Border>

    		<Border x:Name="BrandingBorder" Style="{StaticResource BrandingBorderStyle}">
    			<StackPanel x:Name="BrandingStackPanel" Style="{StaticResource BrandingStackPanelStyle}">
    				<ContentControl Style="{StaticResource LogoIcon}"/>
    				<TextBlock x:Name="ApplicationNameTextBlock" Style="{StaticResource ApplicationNameStyle}" Text="Application Name"/>
    			</StackPanel>
    		</Border>

    	</Grid>

    </Grid>

</UserControl>